
<template>
  <div class="bottom-bar">
    <div class="bar-left">
      <p>
        <i class="icon servcie"></i>
        <span> 客服 </span>
      </p>
      <p>
        <i class="icon shop"></i>
        <span> 店铺</span>
      </p>
      <p>
        <i class="icon collect"></i>
        <span> 收藏</span>
      </p>
    </div>
    <div class="bar-right">
      <div class="cart" @click="addToCart">加入购物车</div>
      <div class="buy">立即购买</div>
    </div>

  </div>
</template>

<script>
export default {
  name: 'detailBottom',
  props: {},
  data() {
    return {}
  },
  methods: {
    addToCart() {
      this.$emit('addCar')
    }
  }
}
</script>

<style scoped>
.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 49px;
  background-color: #fff;
  box-shadow: 0 -2px 1px rgba(100, 100, 100, 0.1);
  display: flex;
}
.bottom-bar > div {
  flex: 1;
}

.bar-right,
.bar-left {
  text-align: center;
  display: flex;
}
.bar-left > p,
.bar-right > div {
  flex: 1;
}
.bar-left .icon {
  display: block;
  width: 22px;
  height: 22px;
  margin: 8px auto 0;
  background: url('~assets/img/detail/detail_bottom.png') 0 0/100%;
}
.bar-left .shop {
  background-position: 0 -98px;
}
.bar-left .collect {
  background-position: 0 0px;
}
.bar-left .servcie {
  background-position: 0 -54px;
}
.bar-right {
  font-size: 14px;
  line-height: 49px;
  color: #fff;
}
.buy {
  background-color: var(--color-high-text);
}
.cart {
  background-color: orange;
}
</style>